<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateArchivesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('archives', function (Blueprint $table) {
//            $table->increments("id");
            $table->string("record_no")->primary();
            $table->text("message")->comment("案卷内容");
            $table->string("photos")->comment("图片")->default("");
            $table->string("video")->comment("视频")->default("");
            $table->string("video_thumb")->comment("视频封面图")->default("");
            $table->string("audio")->comment("语言")->default("");
            $table->double("latitude")->comment("纬度");
            $table->string("phone")->comment("上报人电话");
            $table->double("longitude")->comment("经度");
            $table->string("address")->comment("地址");
            $table->integer("user_id")->nullable()->comment("上传用户");
            $table->integer("record_num")->comment("巡查次数");
            $table->text('process')->comment("信息记录");
            $table->integer("status")->default(0)->comment("案卷状态");
            $table->string("record_username", 500)->comment("巡查人");
            $table->string("record_people")->comment("记录人");
            $table->timestamp("record_date")->comment("记录时间");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('archives');
    }
}
